package com.adderis.soft.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.adderis.soft.domain.dao.INomcommercialDao;
import com.adderis.soft.domain.model.NomCommercial;
import com.adderis.soft.service.INomCommercialBo;

@Service("nomCommercialService")
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public class NomCommercialServiceImpl implements INomCommercialBo {


	@Autowired
	private INomcommercialDao nomcommercialDao;

	@Transactional(readOnly = false)
	public void persist(NomCommercial transientNomCommercial) {
		nomcommercialDao.persist(transientNomCommercial);

	}

	@Transactional(readOnly = false)
	public void remove(NomCommercial persistentNomCommercial) {
		nomcommercialDao.remove(persistentNomCommercial);

	}

	@Transactional(readOnly = false)
	public NomCommercial merge(NomCommercial detachedNomCommercial) {

		return nomcommercialDao.merge(detachedNomCommercial);
	}
	
	@Transactional(readOnly = false)
	public void remove(Integer id) {
		nomcommercialDao.remove(id);

	}

	public NomCommercial findById(Integer id) {
		return nomcommercialDao.findById(id);
	}

	public List<NomCommercial> findAll() {
		return nomcommercialDao.findAll();
	}

	public List<NomCommercial> search(String searchString) {
		return nomcommercialDao.search(searchString);
	}

	

}
